Nowadays, robots are wildly used in many fields such as welding, assembling, conveying, paint spraying, laser machining, etc. A welding robot can perform welding operations automatically in a predetermined way in accordance with the robot program. In shipbuilding industry, a small-type steel ship usually has 100 thousands of welds to millions of welds, which means a large amount of workloads. However, currently, the automation level of welding in shipbuilding is still rather low and it will require a great deal of manpower to perform welding operations on the ship. The main barrier of using a robot in this industry lies in that robot programming is not only time consuming but also very complex. Therefore, there is a need in the art to provide a solution of facilitating the use of a robot in such a complex situation.